


        $(document).on("click",".change-info-btn",function () {
            $(".change-info-top").hide()
            $(".change-info-show").show()
        })

        $(document).on("click",".close-btn",function(){
            $(".change-info-show").hide();
            $(".change-info-top").show();
        })


        $(document).on("click",".sure-btn",function () {
            var date={
                 nick:$(".write-box-input").val(),
                 sign:$(".write-box-textarea").val(),
                 id:$("#uid").val()
            }
            $.ajax({
                type: "POST",
                url: basePath + "updateNike",
                contentType: "application/json",
                dataType: "json",
                data: JSON.stringify(date),
                success: function (data) {
                    window.location.reload()
                }
            })

        })



        $(document).on("click",".change-img-btn",function () {
            upload()
        })



        function upload() {
            var formdate = new FormData();
            var path = $("#imgId")[0].files[0];
            var id=$("#uid").val()
            console.log("path ====================== " + path);
            formdate.append("file", path);
            formdate.append("uid",id);
            $.ajax({
                url: basePath + "upload",
                type: "POST",
                data: formdate,
                async: false,
                processData: false,
                contentType: false,
                success: function (res) {
                    alert(res);
                    if (res != "上传失败") {
                       $("#user-photo").src=res;
                    } else {
                        alert("图片上传失败")
                    }

                }
            })
        }



